/**************************************************************************************************
* Title: SumSimulationManager.h
* Author: Gael Huber
* Description: Manages primary game loop and manages subsystem start up and shutdown.
**************************************************************************************************/
#ifndef __SUMSIMULATIONMANAGER_H__
#define __SUMSIMULATIONMANAGER_H__

#include "SumConfigurationManager.h"
#include "SumSingleton.h"
#include "SumGlobalMemoryManager.h"
#include "SumGlobals.h"
#include "SumJobManager.h"
#include "SumRenderManager.h"
#include "SumResourceManager.h"
#include "SumInputManager.h"
#include "SumMeshLoader.h"

class SimulationManager : public Singleton<SimulationManager> {
public:
	SimulationManager(void);	// Constructor
	virtual ~SimulationManager(void);	// Destructor

	// Get singleton
	inline static SimulationManager& getSingleton(void)
	{
		assert(singleton);
		return *singleton;
	}
	// Get singleton pointer
	inline static SimulationManager* getSingletonPtr(void)
	{
		return singleton;
	}

	void startUp(int nCmdShow);		// Start up all engine subsystems
	void shutDown(void);	// Shut down all engine subsystems
	void run(void);			// Run the simulation game loop
private:
	void gameLoop(void);	// Engine game loop

	ConfigurationManager* configurationManager;		// Engine configuration manager
	GlobalMemoryManager* globalMemoryManager;	// Global memory
	InputManager* inputManager;		// Hardware device input
	JobManager* jobManager;		// Job manager for asynchronous tasks
	RenderManager* renderManager;	// Rendering subsystem
	ResourceManager* resourceManager;	// Resource manager

	// TEMP CODE
	MeshLoader* meshLoader;
};

#endif